package com.jy.framework.sys.service;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jy.framework.sys.dto.AreaTreeDTO;
import com.jy.framework.sys.entity.SysAreaEntity;

/**
 * @author qhchen
 * @email qunhu_chen@jy.com
 * @date 2018-12-14 16:40:03
 */
public interface SysAreaService extends IService<SysAreaEntity> {

    // PageUtils queryPage(Map<String, Object> paramsStr);

    // void deleteBatch(List<Long> ids);

    List<AreaTreeDTO> getAreaTree(String pId);

    /**
     * 获取所有地区数据，从缓存中获取，如果缓存中不存在，则从数据库中拉取
     *
     * @return
     */
    public List<SysAreaEntity> getAllListCache() throws Exception;

    /**
     * 分级code或者name名称返回数据库对象
     *
     * @param code
     * @param name
     * @return SysAreaEntity
     * @throws Exception
     */
    public SysAreaEntity getObj(String code, String name) throws Exception;

    void fillParentIds();
}
